<script type="text/javascript">
		
		function sapxep(page,cot,sapxep){
							var sapxep = sapxep;
						if(page==""){
							if($('.sort').attr('class') == "sort DESC"){
								$('.sort').removeClass('DESC');
								$('.sort').addClass('ASC');
								sapxep = "ASC";
							}
							else if($('.sort').attr('class') == "sort ASC"){
								$('.sort').removeClass('ASC');
								$('.sort').addClass('DESC');
								sapxep = "DESC";
							}
							else if($('.sort').attr('class') == "sort"){
								
								$('.sort').addClass('DESC');
								sapxep = "DESC";
							}
						}
							var cot = cot;
							$.ajax({
								type: "POST", // phương thức gởi đi
								url: "http://localhost/doan/public/tienich/canhan", // nơi mà dữ liệu sẽ chuyển đến khi submit
								data: "page="+ page +"&order_by="+ cot +"&order="+ sapxep+"&cmt="+<?php echo $cmt?>, // giá trị post
								success: function(answer){ // if everything goes well
									
									$('body').html(answer); // đặt kết quả trả về từ test.php vào thẻ div success
								}
							});
		}
</script>

 	<div class="nav-bar">
	<span class="crust">
					<a href="<?php echo $this->url('canhan', array('action' => 'index'));
        ?>" class="crumb"><span><?php  echo 'Thông tin cá nhân' ?></span></a>
					<span class="arrow"><span></span></span>
	</span>

	</div>	
		
	<div id="error" class="error"><?php echo $this->error; ?></div>
	
	<div id="printarea">
		<link type="text/css" href="../css/truonghoc.css" />
        	<div class="box_width_common" style="width: 100%; padding: 0px; height: 17px;">
                <div class="list_share_icon right">
                     <div id="fb-root"></div>
						<script>(
								function(d, s, id) {
   									var js, fjs = d.getElementsByTagName(s)[0];
								    if (d.getElementById(id)) return;
								    js = d.createElement(s); js.id = id;
								    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=1447609522121545";
								    fjs.parentNode.insertBefore(js, fjs);
								    }
							    	(document, 'script', 'facebook-jssdk')
							    );
					    </script>
    					<script type="text/javascript">
    							function printDiv(divName) {
								     var printContents = document.getElementById(divName).innerHTML;
								     var originalContents = document.body.innerHTML;	
								     document.body.innerHTML = "<link rel=\"stylesheet\" type=\"text/css\"  href=\"../css/truonghoc.css\">\n</head><body><div style=\"testStyle\">"+printContents+ "\n</div>\n</body>\n</html>";
								     window.print();	
								     document.body.innerHTML = originalContents;
								}
    					</script>                            
                    <ul>
                        <li style="margin-right:-35px">
                             <a href="http://twitter.com/share" class="twitter-share-button" data-text="VIETNAM IT OUTSOURCING" data-count="horizontal">Tweet</a>
     						 <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                        </li>
                        <li style="margin-right:-35px">
                             <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="medium"></g:plusone>
                        </li>
						<li>
							<a onclick="printDiv('printarea')"   id="print_content" class="icon_portal_thethao icon_printer" alt="Print" title="Print">&nbsp;</a>
						</li>
    				</ul>                                
    			</div>
         </div>
	
	 <H3>Ngày/giờ hiện tại:
	<?php
		 date_default_timezone_set ("Asia/Saigon");
		 $now = getdate(); 
   		 $time = $now["hours"] . ":" . $now["minutes"] . ":" . $now["seconds"] .  "  - " .  $now["mday"] . "/" . $now["mon"] . "/" . $now["year"] ; 
         echo $time;
        
    ?></h3>
	<br><br>
	
	
	<?php if(isset($canhaninfo) && count($canhaninfo) > 0) { ?>
	<?php 
		foreach ($paginator as $info){ ?>
		<table style= "width: 400px;" border="1">
		<tbody>
			<tr>
				<td colspan="2″ align="center"><b>THÔNG TIN BỆNH NHÂN</b></td>
			</tr>
			<tr>
				<td><strong>Họ và Tên: </strong></td>
				<td><?php echo $info->hoten ; ?></td>
			</tr>
			<tr>	
				<td><strong>Số CMT: </strong></td>
				<td><?php echo $info->cmt ; ?></td>
			</tr>
			<tr>
				<td><strong>Ngày Sinh: </strong></td>
				<td><?php echo $info->ngaysinh ; ?></td>
			</tr>
			<tr>
				<td><strong>Giới Tính: </strong></td>
				<td><?php echo $info->gioitinh ; ?></td>
			</tr>
			<tr>
				<td><strong>Địa Chỉ: </strong></td>
				<td><?php echo $info->diachi ; ?></td>
			</tr>
			<tr>
				<td><strong>Số điện thoại: </strong></td>
				<td><?php echo $info->dienthoai ; ?></td>
			</tr>
			<tr>
				<td><strong>Chức Vụ: </strong></td>
				<td><?php echo $info->chucvu ; ?></td>
			</tr>
			<tr>
				<td><strong>Đơn vị công tác: </strong></td>
				<td><?php echo $info->congtac ; ?></td>
			</tr>
			<tr>
				<td><strong>Chuẩn đoán: </strong></td>
				<td><?php echo $info->motabenh ; ?></td>
			</tr>
			<tr>
				<td><strong>Ngày khám: </strong></td>
				<td><?php echo $info->ngaykham ; ?></td>
			</tr>
		</tbody>
		</table>
	<?php		
		};
		echo $this->paginationControl(
			$paginator, 'Sliding', 'paginator-slide', array('order_by' => $order_by, 'order' => $order)
		);
	?>
	<?php } else {
		echo 'Không có thông tin.'
	?>
<?php }?>

		</div>

